using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class EchoResponse : GeneratedMessageLite<EchoResponse, EchoResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<EchoResponse, EchoResponse.Builder>
		{
			private bool resultIsReadOnly;
			private EchoResponse result;
			protected override EchoResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override EchoResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override EchoResponse DefaultInstanceForType
			{
				get
				{
					return EchoResponse.DefaultInstance;
				}
			}
			public string EchoStr
			{
				get
				{
					return this.result.EchoStr;
				}
				set
				{
					this.SetEchoStr(value);
				}
			}
			public Builder()
			{
				this.result = EchoResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(EchoResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private EchoResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					EchoResponse other = this.result;
					this.result = new EchoResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override EchoResponse.Builder Clear()
			{
				this.result = EchoResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override EchoResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new EchoResponse.Builder(this.result);
				}
				return new EchoResponse.Builder().MergeFrom(this.result);
			}
			public override EchoResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override EchoResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is EchoResponse)
				{
					return this.MergeFrom((EchoResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override EchoResponse.Builder MergeFrom(EchoResponse other)
			{
				return this;
			}
			public override EchoResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override EchoResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(EchoResponse._echoResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = EchoResponse._echoResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (WireFormat.IsEndGroupTag(num))
						{
							return this;
						}
						this.ParseUnknownField(input, extensionRegistry, num, text);
					}
					else
					{
						this.result.hasEchoStr = input.ReadString(ref this.result.echoStr_);
					}
				}
				return this;
			}
			public EchoResponse.Builder SetEchoStr(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasEchoStr = true;
				this.result.echoStr_ = value;
				return this;
			}
			public EchoResponse.Builder ClearEchoStr()
			{
				this.PrepareBuilder();
				this.result.hasEchoStr = false;
				this.result.echoStr_ = "";
				return this;
			}
		}
		public const int EchoStrFieldNumber = 1;
		private static readonly EchoResponse defaultInstance;
		private static readonly string[] _echoResponseFieldNames;
		private static readonly uint[] _echoResponseFieldTags;
		private bool hasEchoStr;
		private string echoStr_ = "";
		private int memoizedSerializedSize = -1;
		public static EchoResponse DefaultInstance
		{
			get
			{
				return EchoResponse.defaultInstance;
			}
		}
		public override EchoResponse DefaultInstanceForType
		{
			get
			{
				return EchoResponse.DefaultInstance;
			}
		}
		protected override EchoResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string EchoStr
		{
			get
			{
				return this.echoStr_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasEchoStr)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.EchoStr);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private EchoResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] echoResponseFieldNames = EchoResponse._echoResponseFieldNames;
			if (this.hasEchoStr)
			{
				output.WriteString(1, echoResponseFieldNames[0], this.EchoStr);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasEchoStr)
			{
				num ^= this.echoStr_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			EchoResponse echoResponse = object_0 as EchoResponse;
			return echoResponse != null && (this.hasEchoStr == echoResponse.hasEchoStr && (!this.hasEchoStr || this.echoStr_.Equals(echoResponse.echoStr_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<EchoResponse, EchoResponse.Builder>.PrintField("EchoStr", this.hasEchoStr, this.echoStr_, writer);
		}
		public static EchoResponse ParseFrom(byte[] data)
		{
			return EchoResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private EchoResponse MakeReadOnly()
		{
			return this;
		}
		public static EchoResponse.Builder CreateBuilder()
		{
			return new EchoResponse.Builder();
		}
		public override EchoResponse.Builder ToBuilder()
		{
			return EchoResponse.CreateBuilder(this);
		}
		public override EchoResponse.Builder CreateBuilderForType()
		{
			return new EchoResponse.Builder();
		}
		public static EchoResponse.Builder CreateBuilder(EchoResponse prototype)
		{
			return new EchoResponse.Builder(prototype);
		}
		static EchoResponse()
		{
			EchoResponse.defaultInstance = new EchoResponse().MakeReadOnly();
			EchoResponse._echoResponseFieldNames = new string[]
			{
				"EchoStr"
			};
			EchoResponse._echoResponseFieldTags = new uint[]
			{
				10u
			};
			object.ReferenceEquals(micromsg.Proto.EchoResponse.Descriptor, null);
		}
	}
}
